// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * CoreUrlRewrite generated by hbm2java
 */
@Entity
@Table(name = "core_url_rewrite", catalog = "magento", uniqueConstraints = {
		@UniqueConstraint(columnNames = { "id_path", "is_system", "store_id" }),
		@UniqueConstraint(columnNames = { "request_path", "store_id" }) })
public class CoreUrlRewrite implements java.io.Serializable {

	private Integer urlRewriteId;
	private CatalogCategoryEntity catalogCategoryEntity;
	private CoreStore coreStore;
	private CatalogProductEntity catalogProductEntity;
	private String idPath;
	private String requestPath;
	private String targetPath;
	private Short isSystem;
	private String options;
	private String description;

	public CoreUrlRewrite() {
	}

	public CoreUrlRewrite(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	public CoreUrlRewrite(CatalogCategoryEntity catalogCategoryEntity,
			CoreStore coreStore, CatalogProductEntity catalogProductEntity,
			String idPath, String requestPath, String targetPath,
			Short isSystem, String options, String description) {
		this.catalogCategoryEntity = catalogCategoryEntity;
		this.coreStore = coreStore;
		this.catalogProductEntity = catalogProductEntity;
		this.idPath = idPath;
		this.requestPath = requestPath;
		this.targetPath = targetPath;
		this.isSystem = isSystem;
		this.options = options;
		this.description = description;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "url_rewrite_id", unique = true, nullable = false)
	public Integer getUrlRewriteId() {
		return this.urlRewriteId;
	}

	public void setUrlRewriteId(Integer urlRewriteId) {
		this.urlRewriteId = urlRewriteId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "category_id")
	public CatalogCategoryEntity getCatalogCategoryEntity() {
		return this.catalogCategoryEntity;
	}

	public void setCatalogCategoryEntity(
			CatalogCategoryEntity catalogCategoryEntity) {
		this.catalogCategoryEntity = catalogCategoryEntity;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id", nullable = false)
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id")
	public CatalogProductEntity getCatalogProductEntity() {
		return this.catalogProductEntity;
	}

	public void setCatalogProductEntity(
			CatalogProductEntity catalogProductEntity) {
		this.catalogProductEntity = catalogProductEntity;
	}

	@Column(name = "id_path")
	public String getIdPath() {
		return this.idPath;
	}

	public void setIdPath(String idPath) {
		this.idPath = idPath;
	}

	@Column(name = "request_path")
	public String getRequestPath() {
		return this.requestPath;
	}

	public void setRequestPath(String requestPath) {
		this.requestPath = requestPath;
	}

	@Column(name = "target_path")
	public String getTargetPath() {
		return this.targetPath;
	}

	public void setTargetPath(String targetPath) {
		this.targetPath = targetPath;
	}

	@Column(name = "is_system")
	public Short getIsSystem() {
		return this.isSystem;
	}

	public void setIsSystem(Short isSystem) {
		this.isSystem = isSystem;
	}

	@Column(name = "options")
	public String getOptions() {
		return this.options;
	}

	public void setOptions(String options) {
		this.options = options;
	}

	@Column(name = "description")
	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
